/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.chlitina.store.common.persistence.BaseEntity;

/**
 * 方案产品搭配组合区域季节Entity
 * @author liujiang
 * @version 2014-02-17
 */
@Entity
@Table(name = "solution_face_product_mix_location_season")
@IdClass(SolutionFaceProductMixLsPK.class)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SolutionFaceProductMixLocationSeason extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private SolutionFaceProductMix solutionFaceProductMix; 	// 方案
	private SystemDefinitionAreaSeason systemDefinitionAreaSeason;	//区域季节 

	public SolutionFaceProductMixLocationSeason() {
	}

	@Id
	@ManyToOne(cascade={CascadeType.REFRESH},fetch = FetchType.LAZY)
	@JoinColumn(name="SFPM_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public SolutionFaceProductMix getSolutionFaceProductMix() {
		return solutionFaceProductMix;
	}

	public void setSolutionFaceProductMix(SolutionFaceProductMix solutionFaceProductMix) {
		this.solutionFaceProductMix = solutionFaceProductMix;
	}

	@Id
	@ManyToOne(cascade={CascadeType.REFRESH}, fetch = FetchType.LAZY)
	@JoinColumn(name="SEASON")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public SystemDefinitionAreaSeason getSystemDefinitionAreaSeason() {
		return systemDefinitionAreaSeason;
	}

	public void setSystemDefinitionAreaSeason(SystemDefinitionAreaSeason systemDefinitionAreaSeason) {
		this.systemDefinitionAreaSeason = systemDefinitionAreaSeason;
	}
}


